package com.china.juju.entity;


import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="juju_oauth"
    ,catalog="zutuan_prot"
)
public class JujuOauth  implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    public static final String ENTITY_NAME = "com.china.juju.entity.JujuOauth";
	public static final String TABLE_NAME="juju_oauth";

    public static final String PK_Field = "id"; 
    public static final String PK_Method = "getId";  
	
	public static final String P_id = "id"; 
	public static final String P_platform = "platform"; 
	public static final String P_oauthkey = "oauthkey"; 
	public static final String P_oauthdata = "oauthdata"; 
	public static final String P_userid = "userid"; 
	public static final String P_createdAt = "createdAt"; 
	public static final String P_updatedAt = "updatedAt"; 

     private String id;
     private String platform;
     private String oauthkey;
     private String oauthdata;
     private String userid;
     private Date createdAt;
     private Date updatedAt;

    public JujuOauth() {
    }
	
    public JujuOauth(String id, Date createdAt, Date updatedAt) {
        this.id = id;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    public JujuOauth(String id, String platform, String oauthkey, String oauthdata, String userid, Date createdAt, Date updatedAt) {
        this.id = id;
        this.platform = platform;
        this.oauthkey = oauthkey;
        this.oauthdata = oauthdata;
        this.userid = userid;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
   
    @Id 
    @GeneratedValue( generator="paymentableGenerator")  
    @GenericGenerator(name="paymentableGenerator", strategy="uuid")  
    
    @Column(name="id", unique=true, nullable=false, length=36)
    public String getId() {
        return this.id;
    }
    
    public void setId(String id) {
        this.id = id;
    }
    
    @Column(name="platform", length=11)
    public String getPlatform() {
        return this.platform;
    }
    
    public void setPlatform(String platform) {
        this.platform = platform;
    }
    
    @Column(name="oauthkey", length=128)
    public String getOauthkey() {
        return this.oauthkey;
    }
    
    public void setOauthkey(String oauthkey) {
        this.oauthkey = oauthkey;
    }
    
    @Column(name="oauthdata", length=65535)
    public String getOauthdata() {
        return this.oauthdata;
    }
    
    public void setOauthdata(String oauthdata) {
        this.oauthdata = oauthdata;
    }
    
    @Column(name="userid", length=128)
    public String getUserid() {
        return this.userid;
    }
    
    public void setUserid(String userid) {
        this.userid = userid;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_at", nullable=false, length=19)
    public Date getCreatedAt() {
        return this.createdAt;
    }
    
    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_at", nullable=false, length=19)
    public Date getUpdatedAt() {
        return this.updatedAt;
    }
    
    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }



    @Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


